package com.example.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 前后端数据协议
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class R {

    private Boolean flag;
    private String msg;
    private Object data;

    public R(Boolean flag){
        this.flag = flag;
    }

    public R(String msg){
        this.flag = false;
        this.msg = msg;
    }

    public R(Boolean flag,Object data){
        this.flag = flag;
        this.data = data;
    }

}
